package com.zhanbo.zhanbowymusic.main.featured;

import android.os.Bundle;
import android.text.TextUtils;

import com.mwx.baselib.base.BaseFragment;
import com.mwx.baselib.bean.ArtistAlbumBean;
import com.zhanbo.zhanbowymusic.R;
import com.zhanbo.zhanbowymusic.databinding.FragmentSingerAlbumTextBinding;

public class SingerAlbumTextFragment extends BaseFragment<FragmentSingerAlbumTextBinding> {
    @Override
    protected Object getLayout() {
        return R.layout.fragment_singer_album_text;
    }

    @Override
    protected void init(Bundle savedInstanceState) {
        initData();
        initView();
        initListener();
    }

    @Override
    protected void initData() {
        ArtistAlbumBean.ItemsDTO data = (ArtistAlbumBean.ItemsDTO) getArguments().getSerializable("data");
        binding.tvBriefDesc.setText(!TextUtils.isEmpty(data.getAlbum().getBriefDesc())? data.getAlbum().getBriefDesc():"");
    }

    @Override
    protected void initView() {

    }

    @Override
    protected void initListener() {

    }

    public static SingerAlbumTextFragment newInstance(ArtistAlbumBean.ItemsDTO data) {

        Bundle args = new Bundle();
        args.putSerializable("data",data);
        SingerAlbumTextFragment fragment = new SingerAlbumTextFragment();
        fragment.setArguments(args);
        return fragment;
    }
}
